package Demo2;

/**
 * Created with IntelliJ IEDA.
 * Description:
 * User:86186
 * Date:2022-05-20
 * Time:21:13
 */
interface IShape{
    void draw();
    /*int count = 10;*/
    /*default void func(){

    }
    static void func2(){
        System.out.println("静态成员方法");
    }*/

}
class Ract implements IShape{

    @Override
    public void draw() {
        System.out.println("画一个矩形");
    }
}
class Flower implements IShape{

    @Override
    public void draw() {
        System.out.println("画一朵画");
    }
}
public class Test {
    public static void drawMap(IShape shape){
        shape.draw();
    }
    public static void main(String[] args) {
        drawMap(new Flower());
        drawMap(new Ract());
       /* IShape iShape = new IShape();*/
        }
}
